package com.example.springsecurity.mapper;

import com.example.springsecurity.domain.*;

import com.example.springsecurity.utils.ResultBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExperimentMapper {

        Integer addExperiment(Project project);

        List<Project> searchExperiment(@Param("projectName") String projectName);

        Integer updateProject(Project project);

        List<RoProject> searchArrangementProject(@Param("collegeId") Integer collegeId, @Param("majorId") Integer majorId, @Param("projectName") String projectName);

        Integer arrangementProject(Project project);

        List<RoProject> exportProject();

        List<RoProject> searchProjectMaintenance(@Param("projectName") String projectName,@Param("userId") Integer userId);

        RoProject getProjectMaintenanceDetail(@Param("projectId") Integer productId);

        Integer editProjectMaintenance(Project project);

        Integer editProjectVideo(Video video);

        List<Video> getProjectVideo(@Param("projectId") Integer projectId);

        Integer deleteProjectVideo(@Param("videoId") Integer videoId);

        Integer updateProjectVideo(Video video);

        Integer uploadProjectLearn(LearnMaterials learnMaterials);

        List<LearnMaterials> getProjectLearnMaterials(@Param("projectId") Integer projectId);

        String downloadProjectLearnMaterials(@Param("learnId") Integer learnId);

        Integer editProjectReport(Project project);

        Project getProjectReport(@Param("projectId") Integer projectId);

        SysUser getUsername(@Param("id") Integer projectTeaId);

        void deleteProjectShareTeacher(@Param("projectId") Integer projectId);

        void deleteProjectTeacher(@Param("projectId") Integer projectId);

        void insertShareProject(ProjectShare projectShare);

        void insertTeachProject(ProjectTeach projectTeach);

        List<ProjectShare> getProjectShare(@Param("projectId") Integer productId);


        List<ProjectTeach> getProjectTeach(@Param("projectId") Integer productId);


          /**
           * 根据用户id获取所有负责的实验
           * @param projectIds
           * @param projectName
           * @return
           */
          public List<RoProject> getProjects(@Param("projectIds") List<Integer> projectIds,@Param("projectName") String projectName);


          /**
           * 根据实验项目的id获取到布置实验时所展示的实验内容
           * @param projectId
           * @return
           */
          public AssignProject getAssignProject(Integer projectId);

        RoProject getProject(@Param("projectId") Integer projectId);

        int checkAssignStatus(@Param("projectId") Integer projectId);

        Integer deleteProject(@Param("projectId") Integer projectId);

        void deleteProjectVideoByProjectId(@Param("videoProjectId") Integer videoProjectId);

        List<SysUser> checkProjectAssign(@Param("projectId") Integer projectId);

        Integer deleteProjectMaterials(@Param("learnId") Integer learnId);
}
